<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>

<ui:composition template="/WEB-INF/layout.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui">

    <ui:define name="content">
        <p:panel header="Ficha de Treino">
            <h:form>
                <h:panelGrid columns="4" style="margin-bottom:10px; width: 100%" cellpadding="5">
                    <p:outputLabel for="nome" value="Nome:"/>
                    <p:inputText id="nome" required="true" size="50" value="#{treinoController.alunoSelecionado.nome}" disabled="true">
                    </p:inputText>
                    <p:outputLabel for="idade" value="Idade:"/>
                    <p:inputText id="idade" required="true" disabled="true">
                    </p:inputText>
                    <p:outputLabel for="frequencia" value="Frequência:"/>
                    <p:spinner id="frequencia" min="1" max="6" required="true" maxlength="0">
                    </p:spinner>
                    <p:outputLabel for="peso" value="Peso:"/>
                    <p:inputText id="peso" required="true" maxlength="4" >
                    </p:inputText>
                    <p:outputLabel  value="Objetivo:"/>
                    <p:selectOneMenu  value="obj" id="teste">  
                        <f:selectItem itemLabel="Condicionamento Físico Geral" itemValue="" />  
                        <f:selectItem itemLabel="Definição Muscular" itemValue="1" />  
                        <f:selectItem itemLabel="Emagrecimento" itemValue="2" />  
                        <f:selectItem itemLabel="Hipertrofia" itemValue="3" />
                        <f:selectItem itemLabel="Resistência" itemValue="4" /> 
                    </p:selectOneMenu>
                    <p:outputLabel for="estatura" value="Estatura:"/>
                    <p:inputText id="estatura" required="true" maxlength="5">
                    </p:inputText>
                </h:panelGrid>
                <h:panelGrid columns="3" style="margin-bottom:10px" cellpadding="5">
                    <p:outputLabel for="obs" value="Observações:" style="100%"/>
                    <p:spacer width="7" height="0" />
                    <p:inputText id="obs" required="false" size="100"/>
                </h:panelGrid>
                <h:panelGrid columns="7" style="margin-bottom:10px" cellpadding="5">
                    <p:outputLabel value="Pré-treino:"/>
                    <p:spacer width="45" height="0" />
                    <p:selectOneMenu value="0">  
                        <f:selectItem itemLabel="Bicicleta" itemValue="0" />  
                        <f:selectItem itemLabel="Corda" itemValue="1" />  
                        <f:selectItem itemLabel="Pista" itemValue="2" />    
                    </p:selectOneMenu>
                    <p:spacer width="90" height="0" />
                    <p:selectOneRadio id="pretreino" value="">  
                        <f:selectItem itemLabel="Inicial" itemValue="1" />
                        <f:selectItem itemLabel="Final" itemValue="2" />    
                    </p:selectOneRadio>
                    <p:spacer width="310" height="0" />
                    <p:button value="Adicionar"></p:button>
                </h:panelGrid>
                <p:dataTable id="pretreinos" var="pretr" style="width:100%;" emptyMessage="Informar um pré-treino.">  
                    <p:column headerText="Nome">  
                        <h:outputText value="" />  
                    </p:column>  
                    <p:column headerText="Tempo (min)" >  
                        <h:outputText value="" />  
                    </p:column>  
                    <p:column headerText="Intensidade (borg)">  
                        <h:outputText value="" />  
                    </p:column>  
                    <p:column  headerText="Tipo" >  
                        <h:outputText value="" />  
                    </p:column>  
                </p:dataTable> <br />
                <h:panelGrid columns="1" style="margin-bottom:10px" cellpadding="5">
                    <p:outputLabel value="Alongamento Inicial"/>
                </h:panelGrid>
                <h:panelGrid columns="32" style="margin-bottom:10px" cellpadding="5">
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="01 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="02 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="03 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="04 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="05 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="06 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="07 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="08 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="09 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="10 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="11 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="12 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="13 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="14 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="15 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="16 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="17 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="18 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="19 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="20 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="21 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="22 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="23 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="24 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="25 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="26 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="27 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="28 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="29 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="30 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="31 " />
                </h:panelGrid> <br />
                <h:panelGrid columns="1" style="margin-bottom:10px" cellpadding="5">
                    <p:outputLabel value="Alongamento Final"/>
                </h:panelGrid>
                <h:panelGrid columns="32" style="margin-bottom:10px" cellpadding="5">
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="01 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="02 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="03 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="04 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="05 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="06 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="07 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="08 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="09 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="10 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="11 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="12 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="13 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="14 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="15 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="16 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="17 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="18 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="19 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="20 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="21 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="22 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="23 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="24 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="25 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="26 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="27 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="28 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="29 " />

                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="30 " />
                    <p:selectBooleanCheckbox value="" />  
                    <h:outputText value="31 " />
                </h:panelGrid>
                <h:panelGrid columns="3" cellpadding="5">
                    <h:outputText value="Exercícios" style="font-size: x-large" />
                    <p:spacer width="605" height="10" />
                    <p:commandButton value="Adicionar Exercícios" onclick="PF('dlg').show();" title="login"/>
                </h:panelGrid> <br />
                <p:dataTable id="exercicios" var="exercicios" style="width:100%;"> 
                    <p:row> </p:row>
                    <p:column headerText="Sequência">  
                        <h:outputText value="" />  
                    </p:column>  
                    <p:column headerText="Exercício">  
                        <h:outputText value="" />  
                    </p:column>  
                    <p:column headerText="Série">  
                        <h:outputText value="" />  
                    </p:column>  
                    <p:column  headerText="Repetições">  
                        <h:outputText value="" />  
                    </p:column>
                    <p:column headerText="Carga">  
                        <h:outputText value="" />  
                    </p:column>  
                    <p:column  headerText="Treino">  
                        <h:outputText value="" />  
                    </p:column> 
                </p:dataTable>
                <p:spacer width="0" height="50" />
                <p:button value="Limpar" />
                <p:spacer width="10" height="0" />
                <p:commandButton value="Salvar" onclick="openDialog(popupExercicio)" />
            </h:form>

        </p:panel>
        <p:growl id="growl" showDetail="true" life="3000" />
        <p:dialog id="dialog" header="Exercícios" widgetVar="dlg" resizable="false">  
            <h:form>
                    <p:outputLabel value="Grupo Muscular:" />
                    <p:spacer width="10" height="0" />
                    <p:selectOneMenu value="0">  
                        <f:selectItem itemLabel="Abdome" itemValue="0" />  
                        <f:selectItem itemLabel="Bíceps" itemValue="1" />  
                        <f:selectItem itemLabel="Costas" itemValue="2" />  
                        <f:selectItem itemLabel="Peito" itemValue="3" />
                        <f:selectItem itemLabel="Perna" itemValue="4" />
                        <f:selectItem itemLabel="Ombro" itemValue="5" />
                        <f:selectItem itemLabel="Tríceps" itemValue="6" />
                    </p:selectOneMenu>
                    <p:spacer width="30" height="0" />
                    <p:outputLabel value="Treino:" />
                    <p:spacer width="10" height="0" />
                    <p:selectOneMenu  value="0">  
                        <f:selectItem itemLabel="A" itemValue="0" />  
                        <f:selectItem itemLabel="B" itemValue="1" />  
                        <f:selectItem itemLabel="C" itemValue="2" />  
                        <f:selectItem itemLabel="D" itemValue="3" />
                        <f:selectItem itemLabel="E" itemValue="4" /> 
                    </p:selectOneMenu><br/><br/>
                    <p:dataTable id="exercicios" var="pretr" value="" style="width:100%;">>  
                        <p:column headerText="Código">  
                            <p:outputLabel value="" />  
                        </p:column>  
                        <p:column headerText="Nome" >  
                            <p:outputLabel value="" />  
                        </p:column>  
                        <p:column headerText="Grupo Muscular">  
                            <p:outputLabel value="" />  
                        </p:column>
                    </p:dataTable> <br/>
                    <p:outputLabel for="serie" value="Serie:" />
                    <p:spacer width="10" height="0" />
                    <p:spinner id="serie" min="0" size="5" maxlength="0"/>
                    <p:spacer width="20" height="0" />
                    <p:outputLabel for="repeticoes" value="Repetições:" />
                    <p:spacer width="10" height="0" />
                    <p:spinner id="repeticoes" min="0" size="5" maxlength="0"/>
                    <p:spacer width="20" height="0" />
                    <p:outputLabel for="carga" value="Carga:" />
                    <p:spacer width="10" height="0" />
                    <p:spinner id="carga" min="0" size="5" maxlength="0"/>
                    <p:spacer width="20" height="0" />
                    <p:button value="OK" /> <br/>
                    <p:spacer width="0" height="50" />
                    <p:button value="Cancelar" />
                    <p:spacer width="10" height="0" />
                    <p:button value="Incluir" />
                </h:form>
        </p:dialog>  
    </ui:define>
</ui:composition>

  